from django.contrib import admin

# Register your models here.
from User.models import *


@admin.register(UserInfo)
class StudentAdmin(admin.ModelAdmin):
    # 要显示的字段
    list_display = ('StudentName',
                    'StudentID',
                    'StudentMajor',
                    'StudentYear',
                    'enable',
                    'create_time',
                    'update_time'
                    )

    # 需要搜索的字段
    search_fields = ('StudentName', 'StudentID')

    # 分页显示，一页的数量
    list_per_page = 10

    actions_on_top = True


@admin.register(UserPW)
class StudentAdmin(admin.ModelAdmin):
    # 要显示的字段
    list_display = ('StudentID',
                    'Password',
                    )

    # 需要搜索的字段
    search_fields = ('StudentName', 'StudentID')

    # 分页显示，一页的数量
    list_per_page = 10

    actions_on_top = True